﻿#ifndef FRIENDREQUESTLIST_H
#define FRIENDREQUESTLIST_H

#include <QWidget>
#include "mywidget.h"
#include "MyPDU.h"
#include <QVector>
#include "mylistwidgetitem2.h"

namespace Ui {
class FriendRequestList;
}

class FriendRequestList : public MyWidget
{
    Q_OBJECT

public:
    explicit FriendRequestList(QWidget *parent = nullptr);
    ~FriendRequestList();
    void addItem(UserInfo& uInfo,QString msg);
    void addItem(MyListWidgetItem2* mwi);
    static FriendRequestList* getInstance();
    void updateRequestStatus(const QString& id,int type);
    void updateFileContent(const QString& id,int status);
private slots:
    void on_btn_close_clicked();
    void initFriendInfoFromFile();
    void on_btn_min_clicked();

private:
    static FriendRequestList* m_pMian;
    Ui::FriendRequestList *ui;
    QVector<MyListWidgetItem2*> m_vec;
};

#endif // FRIENDREQUESTLIST_H
